home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / dev / mui / bcc_src.lha / Parser / ParseHeader.cpp < prev    next >
C/C++ Source or Header  |  1998-03-15  |  716b  |  46 lines

  1. #include <string.h>
  2.  
  3. #include "ParseFile.h"
  4. #include "Global.h"
  5. #include "ParseBH.h"
  6.  
  7.  
  8. short ParseFile::DoHeader( void )
  9. {
  10.  
  11.     GetToken();
  12.     if( !TokLen ) return 0;
  13.     
  14.     if( *Tok == '"' && TokLen > 5 && !strncmp( Tok+TokLen-4, ".bh\"", 4 ) ) {
  15.     
  16.         StopCopy();
  17.         String buf( Tok+1, TokLen );
  18.         buf.Cut( TokLen - 2, 0 );
  19.         String buf2( Tok, TokLen );
  20.         buf2.Cut( TokLen-3, 1 );
  21.         buf2.Cut( TokLen-1, 0 );
  22.         fprintf( ofh, "%s", (char*)buf2 );
  23.         
  24.         buf2 = buf;
  25.         buf2.Cut( buf2.Len - 3, 0 );
  26.  
  27.         if( !ClassList.FindItem( (char*)buf2, 0 ) ) {
  28.  
  29.             ParseBH pbh;
  30.             if( pbh.Open( (char*)buf, 0 ) ) {
  31.                 short res = pbh.Start();
  32.                 pbh.Close();
  33.                 if( !res ) return 0;
  34.             
  35.             }
  36.             
  37.         }
  38.             
  39.         StartCopy();
  40.         
  41.         
  42.     }
  43.  
  44.     return 1;
  45. }
  46.